import request from '@/utils/request'

// 查询announcements列表
export function listAnnouncements(query) {
  return request({
    url: '/system/announcements/list',
    method: 'get',
    params: query
  })
}

// 查询announcements详细
export function getAnnouncements(TEXTID) {
  return request({
    url: '/system/announcements/' + TEXTID,
    method: 'get'
  })
}

// 新增announcements
export function addAnnouncements(data) {
  return request({
    url: '/system/announcements',
    method: 'post',
    data: data
  })
}

// 修改announcements
export function updateAnnouncements(data) {
  return request({
    url: '/system/announcements',
    method: 'put',
    data: data
  })
}

// 删除announcements
export function delAnnouncements(TEXTID) {
  return request({
    url: '/system/announcements/' + TEXTID,
    method: 'delete'
  })
}
